import http from "@/utils/axios";

export const calendar_add = async (date: string, noon: Array<string>, night: Array<string>) => {
    return await http.post('/calendar_add/', {'date': date, 'noon': noon, 'night': night});
}

export const calendar_data = async (start_time: string, last_time: string) => {
    return await http.post('/calendar_data/', {'start_time': start_time, 'last_time': last_time});
}

export const score_data = async (pageSize: number, currentPage: number) => {
    return await http.post('/score_data/', {'pageSize': pageSize, 'currentPage': currentPage});
}

export const score_upd_cover = async (formdata) => {
    return await http.post('/score_upd_cover/', formdata, {headers: {"Content-Type": "multipart/form-data"}});
}

export const score_upd_score = async (date: string, time: string, food: string, score: number) => {
    return await http.post('/score_upd_score/', {'date': date, 'time': time, 'food': food, 'score': score});
}

export const score_del_cover = async (date: string, time: string, food: string) => {
    return await http.post('/score_del_cover/', {'date': date, 'time': time, 'food': food});
}